package com.wenjun.young.web.controller;

import com.wenjun.young.web.entity.form.LoginForm;
import com.wenjun.young.web.entity.model.AjaxResult;
import com.wenjun.young.web.service.AppService;
import com.wenjun.young.web.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 小程序Controller
 *
 * @author cnwejun
 * @date 2021-11-24
 */
@Api(tags = "App端接口集合")
@RestController
@RequestMapping("/app")
public class AppController {

    @Autowired
    private AppService appService;

    @Autowired
    private UserService userService;

    @ApiOperation("微信登录接口")
    @PostMapping("/login")
    public AjaxResult login(@RequestBody LoginForm form) {
        return appService.login(form);
    }
}
